Skip to content

Add namespacing and PSR-4 style autoloader#295

Merged
pfefferle merged 4 commits into
trunkfrom
feature/namespacing
Jan 5, 2026
Merged

Add namespacing and PSR-4 style autoloader#295
pfefferle merged 4 commits into
trunkfrom
feature/namespacing

Conversation

@pfefferle

Copy link
Copy Markdown
Member

Summary

  • Add Indieweb namespace with Hcard and Relme subnamespaces
  • Add WordPress-compatible autoloader (class- prefix style, same as webmention plugin)
  • Modernize main plugin file structure using singleton pattern
  • Add INDIEWEB_VERSION constant
  • Remove strict_class_file_names phpcs exception

New Structure

indieweb.php                          # Main plugin file
includes/
├── class-autoloader.php              # Indieweb\Autoloader
├── class-indieweb.php                # Indieweb\Indieweb (singleton)
├── class-plugin-installer.php        # Indieweb\Plugin_Installer
├── class-general-settings.php        # Indieweb\General_Settings
├── class-integrations.php            # Indieweb\Integrations
├── hcard/
│   ├── class-user.php                # Indieweb\Hcard\User
│   └── class-author-widget.php       # Indieweb\Hcard\Author_Widget
└── relme/
    ├── class-domain-icon-map.php     # Indieweb\Relme\Domain_Icon_Map
    └── class-widget.php              # Indieweb\Relme\Widget

Test plan

  • Verify plugin activates without errors
  • Test rel-me widget displays correctly
  • Test h-card author widget displays correctly
  • Verify admin settings page works
  • Verify plugin installer page works
  • Run composer lint to confirm PHPCS passes

@pfefferle pfefferle self-assigned this Dec 20, 2025
@pfefferle pfefferle requested a review from dshanske December 20, 2025 13:29
- Add Indieweb namespace with Hcard and Relme subnamespaces
- Add WordPress-compatible autoloader (class- prefix style)
- Modernize main plugin file structure (singleton pattern)
- Add INDIEWEB_VERSION constant
- Remove strict_class_file_names phpcs exception

New structure:
- Indieweb\Autoloader
- Indieweb\Indieweb (main plugin class)
- Indieweb\Plugin_Installer
- Indieweb\General_Settings
- Indieweb\Integrations
- Indieweb\Hcard\User
- Indieweb\Hcard\Author_Widget
- Indieweb\Relme\Domain_Icon_Map
- Indieweb\Relme\Widget
@pfefferle pfefferle requested a review from a team December 20, 2025 21:37
@pfefferle

Copy link
Copy Markdown
Member Author

@dshanske any ideas on that one?

@dshanske

Copy link
Copy Markdown
Member

Everything looks good, was still thinking about the icon question...let me focus on this so we can merge it and I'll keep thinking.

@pfefferle

Copy link
Copy Markdown
Member Author

@dshanske what do you mean by "let me focus on this so we can merge it and I'll keep thinking".

do you think this PR is depending on the icons?

@dshanske

dshanske commented Jan 2, 2026

Copy link
Copy Markdown
Member

No, I'm saying that I was thinking about the other discussion and didn't think enough about this one.

@pfefferle

pfefferle commented Jan 3, 2026

Copy link
Copy Markdown
Member Author

@dshanske what about #300 ?

@dshanske dshanske left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to work.

@pfefferle pfefferle merged commit ed0b53e into trunk Jan 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants